package city.spring.modules.medicalstation.medicationRecord.service;

import city.spring.modules.medicalstation.medicationRecord.entity.MedicationRecordEntity;
import city.spring.modules.medicalstation.medicationRecord.vo.MedicationRecordVO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Service：用药记录
 *
 * @author 谢金婷
 * @date 2020-10-23 16:04:43
 */
public interface MedicationRecordService extends IService<MedicationRecordEntity> {
    String CACHE_NAME = "medication_record";

    /**
     * 业务处理：保存一个 <strong>用药记录</strong>
     *
     * @param entity 用药记录
     */
    void saveMedicationRecord(MedicationRecordEntity entity);

    /**
     * 业务处理：修改一个 <strong>用药记录</strong>
     *
     * @param entity 用药记录
     */
    void updateMedicationRecord(MedicationRecordEntity entity);

    /**
     * 业务处理：删除一个 <strong>用药记录</strong>
     *
     * @param primaryKey 主键ID
     */
    void deleteMedicationRecord(String primaryKey);

    /**
     * 业务处理：删除多个 <strong>用药记录</strong>
     *
     * @param primaryKeys 主键ID列表
     */
    void deleteMedicationRecord(List<String> primaryKeys);

    IPage<MedicationRecordVO> listPage(Page<? extends MedicationRecordEntity> page, @Param(Constants.WRAPPER) Wrapper<? extends MedicationRecordEntity> wrapper);

}